/*
 =========================================================
 * Vue Black Dashboard - v1.1.2
 =========================================================

 * Product Page: https://www.creative-tim.com/product/black-dashboard
 * Copyright 2023 Creative Tim (http://www.creative-tim.com)

 =========================================================

 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 */
import Vue from "vue";
import VueRouter from "vue-router";
import RouterPrefetch from 'vue-router-prefetch'
import App from "./App";
// TIP: change to import router from "./router/start./router/starterRouter"; to start with a clean layout
// import router from "./router/index";
import router from "./router/starterRouter";
import store from "./store";
import BlackDashboard from "./plugins/blackDashboard";
import i18n from "./i18n"
import 'font-awesome/css/font-awesome.min.css';


import './assets/icon/iconfont.css'

import './registerServiceWorker'

import haveTalk from "@/layout/starter/haveTalk.vue"
import agentNavBar from "@/layout/agent/agentNavBar.vue"
import agentMainLeft from "@/layout/agent/agentMainLeft.vue";
import agentMainRight from "@/layout/agent/agentMainRight.vue";
import FloatBtn from './components/FloatBtn.vue' // 假设 FloatBtn.vue 在 components 文件夹下
import {
  Avatar,
  Button,
  ButtonGroup,
  Col,
  Container,
  Dialog,
  Divider,
  Form,
  FormItem,
  Header,
  Image,
  Input,
  InputNumber,
  Link,
  Main,
  MessageBox,
  Row,
  Select,
  Table,
  TableColumn,
  Tag,
  Tooltip,
} from 'element-ui';
import * as echarts from 'echarts';
import 'echarts-gl';

Vue.component('haveTalk',haveTalk);
Vue.component('agentNavBar',agentNavBar);
Vue.component('agentMainLeft',agentMainLeft)
Vue.component('agentMainRight',agentMainRight)

// 全局注册 FloatBtn 组件
Vue.component('FloatBtn', FloatBtn)

Vue.component(ButtonGroup.name, ButtonGroup);
Vue.component(Button.name, Button);
Vue.component(Input.name, Input);
Vue.component(InputNumber.name, InputNumber);
Vue.component(Select.name, Select);
Vue.component(Table.name, Table);
Vue.component(TableColumn.name, TableColumn);//element组件
Vue.component(Divider.name, Divider);
Vue.component(Container.name, Container);
Vue.component(Header.name,Header);
Vue.component(Main.name, Main);
Vue.component(Tag.name,Tag);
Vue.component(Image.name,Image);
Vue.component(Avatar.name, Avatar);
Vue.component(Row.name,Row);
Vue.component(Col.name,Col);
Vue.component(Form.name,Form);
Vue.component(FormItem.name,FormItem);
Vue.component(Link.name,Link)
Vue.component(Dialog.name,Dialog)
Vue.use(Tooltip);

Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
//echart组件
Vue.prototype.$echarts = echarts

Vue.use(BlackDashboard);
Vue.use(VueRouter);
Vue.use(RouterPrefetch);

/* eslint-disable no-new */
new Vue({
  router,
  i18n,
  store,
  render: h => h(App)
}).$mount("#app");

// const BaseURL = "https://drs.mynatapp.cc";
const BaseURL = "http://localhost:8080";
// const BaseURL = "http://42.193.100.159:8080";
Vue.prototype.$BaseURL = BaseURL;
